<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta content="This is Chris's Home Page" name="description">
    <meta content="Chris,Web,Music,photo" name="keywords">
    <meta content="text/html;charset=utf-8" http-equiv="content-type"/>
    <title>Hello JavaScript!</title>
    <script type="text/javascript">
        function test() {
            var str = "aaaWindows2000bbbWindows98cccWindows2008";

            //var regexp = new RegExp("^a.*b","g");
            //var regexp = /^a(?:123)*b$/g;
            var regexp = /windows\d+/gi;
            var strArr = [];
            var result = null;
            while ((result = regexp.exec(str)) != null) {
                strArr.push(result[0]);
            }
            alert(strArr);
            //alert(regexp.test(str));
        };

    </script>
</head>
<body>
<button onclick="test()">Test</button>
</body>
</html>
